/*
 * monster.h
 *
 *  Created on: 15 nov. 2010
 *      Author: Eddy Zogbo and Moncef Sbay
 */

#ifndef MONSTER_H_
#define MONSTER_H_

#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
#include <SDL_image.h>

#include "../include/constant.h"
#include "../include/map.h"
#include "../include/player.h"

typedef struct s_map* t_map;
typedef struct s_monster * t_monster;
enum M_way {
	NORTH_M = 0, SOUTH_M, WEST_M, EAST_M
};

// Creates a new monster and locate the monster
extern t_monster monster_init();
extern t_monster monster_place(int x, int y);

//free memory that take the monster
extern void monster_free(t_monster monster);

//caracterize the monster explosion
extern void explode_monster(t_monster monster);

//Returns the monster has_exploded
extern int has_exploded_M(t_monster monster);
extern void monster_free(t_monster monster);

//check if the monster has been killed on (x,y)
extern void monster_kill(int x, int y, t_monster monster);

// Move the player according to the current direction
extern int monster_move(t_monster monster, t_player player, t_map map,
		SDL_Surface * screen);
// Display the player on the screen
extern void monster_display(t_monster monster, t_map map, t_player player,
		SDL_Surface *screen);

//set current way of the monster
extern void monster_set_current_way(t_monster monster, enum M_way way);

#endif /* MONSTER_H_ */

